﻿namespace Runtime.Models {

    /// <summary>
    /// 应用数据
    /// </summary>
    public interface IDFR_ApplicationModel : IDFR_Model {

        IDFR_ApplicationModelSetter AsSetter();

        string ID { get; }

        string Name { get; }
    }

    public interface IDFR_ApplicationModelSetter {

        void SetID(string value);

        void SetName(string value);
    }

    [Implement(typeof(IDFR_ApplicationModel))]
    internal sealed class DFR_ApplicationModel : DFR_Model, IDFR_ApplicationModel, IDFR_ApplicationModelSetter {

        public IDFR_ApplicationModelSetter AsSetter() => this;

        public string ID { get; private set; }

        public string Name { get; private set; }

        void IDFR_ApplicationModelSetter.SetID(string value) => ID = value;

        void IDFR_ApplicationModelSetter.SetName(string value) => Name = value;
    }
}
